from luqum.elasticsearch import ElasticsearchQueryBuilder
from luqum.parser import parser
es_builder = ElasticsearchQueryBuilder(not_analyzed_fields=["published", "tag"])
tree = parser.parse('''
china AND NOT (politics AND answer)
''')
query = es_builder(tree)
print(query)